package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpCardAddDTO;
import org.jsola.hr.dto.EmpCardUpdateDTO;
import org.jsola.hr.query.EmpCardQuery;
import org.jsola.hr.vo.EmpCardListVO;
import org.jsola.hr.vo.EmpCardVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工证件信息")
public interface IEmpCardControllerAPI {

    /**
     * 新增员工证件信息
     * @param empCardAddDTO 员工证件信息新增实体
     * @return 员工证件信息展示对象
     */
    @ApiOperation(value = "新增员工证件信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardAddDTO", dataType = "EmpCardAddDTO", value = "新增员工证件信息", paramType = "body")
    })
    Result<EmpCardVO> save(EmpCardAddDTO empCardAddDTO);


    /**
     * 修改员工证件信息
     * @param empCardUpdateDTO 员工证件信息
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工证件信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardUpdateDTO", dataType = "EmpCardUpdateDTO", value = "修改员工证件信息", paramType = "body")
    })
    Result<Integer> update(EmpCardUpdateDTO empCardUpdateDTO);




    /**
     * 删除单个员工证件信息，彻底删除
     * @param empCardId 员工证件信息id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工证件信息，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardId", dataType = "String", value = "员工证件信息id", paramType = "path")
    })
    Result<Integer> delete(String empCardId);


    /**
     * 批量删除员工证件信息，彻底删除
     * @param empCardIds 员工证件信息id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工证件信息，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardIds", dataType = "String[]", value = "员工证件信息id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empCardIds);


    /**
     * 根据员工证件信息id查询员工证件信息详情
     * @param empCardId 员工证件信息id
     * @return 员工证件信息详情
     */
    @ApiOperation(value="根据员工证件信息id查询员工证件信息详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardId", dataType = "String", value = "员工证件信息id", paramType = "path")
    })
    Result<EmpCardVO> findById(String empCardId);


    /**
     * 查询员工证件信息
     * @param empCardQuery 员工证件信息查询参数
     * @return page
     */
    @ApiOperation(value="查询员工证件信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardQuery", dataType = "EmpCardQuery", value = "员工证件信息查询参数", paramType = "query")
    })
    Result<List<EmpCardListVO>> listAll(EmpCardQuery empCardQuery);


     /**
     * 分页查询员工证件信息
     * @param empCardQuery 员工证件信息查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工证件信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCardQuery", dataType = "EmpCardQuery", value = "员工证件信息查询参数", paramType = "query")
    })
    Result<Page<EmpCardListVO>> page(EmpCardQuery empCardQuery);


}

